using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework;

namespace BoOnce.Core.Input
{
    class GamePadInput
    {
        public const int MAX_PLAYER = 4;

        public readonly GamePadState[] CurrentGamePadStates;
        public readonly GamePadState[] LastGamePadStates;

        public GamePadInput()
        {
            CurrentGamePadStates = new GamePadState[MAX_PLAYER];
            LastGamePadStates = new GamePadState[MAX_PLAYER];
        }

        public void Update()
        {
            for (int i = 0; i < MAX_PLAYER; i++)
            {
                LastGamePadStates[i] = CurrentGamePadStates[i];
                CurrentGamePadStates[i] = GamePad.GetState((PlayerIndex)i);
            }
        }
    }
}
